package com.chatserver.client.gui;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

import com.chatserver.client.gui.Menu;
import com.chatserver.client.handlers.ConnectionHandler;

public class Frame extends JFrame {
	
	//public static int OPTION;
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public Frame() {
		setSize(600, 500);
		setTitle("ChatServer Client V1.0");
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		new Menu();
		//final LoginHandler loginhandler = new LoginHandler();
		
		//Toolkit toolkit = getToolkit();
		//Dimension size = toolkit.getScreenSize();
		
		switch(ConnectionHandler.OPTION) {
		case 1:
			//add(LoginScreen.panel);
			System.out.println("Option: " + ConnectionHandler.OPTION);
		break;
		case 2:
			//nothing yet
		break;
		default:
			System.out.println("Option: " + ConnectionHandler.OPTION);
		}
		
		setVisible(true);
	}

	public static void PrintMessage() {
		JOptionPane.showMessageDialog(null, "The ChatServer is currently offline!", "Error", JOptionPane.ERROR_MESSAGE);
		System.exit(0);
	}
}
